package com.tedu.bill.demo3;

/**
 * Author：毕龙
 * Date: 2024/5/24 14:11
 */
public class TestPriority {
    public static void main(String[] args) {
        //线程的优先级测试
        MyThread t1 = new MyThread("线程1");
        MyThread t2 = new MyThread("线程2");

        //设置线程的优先级
//        t1.setPriority(1);
//        t2.setPriority(10);
        t1.setPriority(Thread.MAX_PRIORITY);
        t2.setPriority(Thread.MIN_PRIORITY);

        t1.start();
        t2.start();

    }
}
